package com.yyfax.pay.third.model.to.fuioudeposit;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.yyfax.framework.model.BasePO;
import com.yyfax.pay.common.util.XmlUtil;

/**
 * 结果响应xml实体
 * 
 * @author buyi
 * @date 2017-09-02 16:35:20
 * @since v2.0.0
 */
@SuppressWarnings("serial")
@XStreamAlias("ap")
public class ResultXMLRsp extends BasePO {

	private BasePlainXMLRsp plain;

	@XStreamAlias("signature")
	private String sign;

	public BasePlainXMLRsp getPlain() {
		return plain;
	}

	public void setPlain(BasePlainXMLRsp plain) {
		this.plain = plain;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String toXml() {
		// QNameMap qmap = new QNameMap();
		// qmap.setDefaultPrefix("");
		// StaxDriver staxDriver = new StaxDriver(qmap);
		// XStream xstream = new XStream(staxDriver);
		// xstream.autodetectAnnotations(true);
		// xstream.ignoreUnknownElements();
		// xstream.alias("ap", ResultXMLRsp.class);
		// try {
		// StringWriter strWriter = new StringWriter();
		// StaxWriter sw = new StaxWriter(staxDriver.getQnameMap(), staxDriver.getOutputFactory().createXMLStreamWriter(strWriter), false, true);
		// xstream.marshal(this, sw);
		// sw.close();
		// return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + strWriter.toString().replaceAll("__", "_");
		// } catch (Exception e) {
		// e.printStackTrace();
		// }
		// return null;
		return XmlUtil.toXmlForXStream(this, "ap");
	}
}
